!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[HtmlComponent]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[HtmlComponent]"]=t(require("react")):e["rb_wixui.thunderbolt[HtmlComponent]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(){var t={5329:function(t){"use strict";t.exports=e},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t"undefined"!=typeof window;const c=13,i=27;function l(e){return t=>{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}l(32),l(c),l(i);var d="_xg6_p",f="SMuTIa",p="wuksD5";const m={HtmlComponent:{component:r.forwardRef(((e,n)=>{const{id:o,className:u,url:c,allow:i,scrolling:l,title:m,sandbox:v,onMessage:b,onMouseEnter:y,onMouseLeave:g,translations:x}=e,[w,h]=r.useState(!1);r.useEffect((()=>h(!0)),[]);const E=r.useCallback((e=>{try{"message"===e.type&&(null==b||b({data:e.payload,type:"message"}))}catch(e){return}}),[b]),[M,_]=function(e){let{reducer:t=(()=>({})),iframeLoaded:n}=e;const o=(0,r.useRef)([]),u=(0,r.useRef)(void 0),a=(0,r.useRef)(void 0),c=(0,r.useRef)(void 0),i=(0,r.useCallback)(((e,t)=>{if(u.current&&n||null!=t&&t.forceSend){var r;const t=null==(r=u.current)?void 0:r.contentWindow;return void(null==t||t.postMessage(e,"*"))}if(!u.current||!a.current||!1===n)return void o.current.push(e);const s=u.current.contentWindow;null==s||s.postMessage(e,"*")}),[n]),l=(0,r.useCallback)((()=>{0!==o.current.length&&!1!==n&&(o.current.forEach((e=>i(e))),o.current=[])}),[i,n]),d=(0,r.useCallback)((e=>{if(c.current&&(c.current(),c.current=void 0),!e)return;const r=()=>{a.current=!0,l(),t({type:"load"},i)};e.addEventListener("load",r),u.current=e,c.current=()=>{e.removeEventListener("load",r)}}),[t,i,l]);return(0,r.useEffect)((()=>{n&&l()}),[n,l]),(0,r.useEffect)((()=>{if(!s())return;const e=e=>{var r;e.source&&e.source!==(null==(r=u.current)?void 0:r.contentWindow)||t({type:"message",payload:e.data},i)};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[t,i]),[d,i]}({reducer:E});return r.useImperativeHandle(n,(()=>({postMessage(e){_(e)}}))),r.createElement("div",t()({id:o},(e=>Object.entries(e).reduce(((e,[t,r])=>(t.includes("data-")&&(e[t]=r),e)),{}))(e),((e={})=>{const t=e.tabIndex??e.tabindex??void 0;return void 0!==t?{tabIndex:Number(t)}:{}})(e.a11y),{className:a(u,d)}),w&&r.createElement("wix-iframe",{"data-src":c},r.createElement("div",{className:f,onMouseEnter:y,onMouseLeave:g},r.createElement("iframe",{ref:M,sandbox:v,className:p,scrolling:l,title:m||x.title,name:"htmlComp-iframe",width:"100%",height:"100%",allow:i,"data-src":c}))))}))}}}(),o}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[HtmlComponent].dffd4bd2.bundle.min.js.map